﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="maintenanceDiscussionAdd.aspx.vb" Inherits="Web_2._0_BMW___X6_Experts_Web_Application.maintenanceDiscussionAdd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">

        .style2
        {
            color: #3399FF;
            text-decoration: underline;
        }
    
        .discussionInformation
        {
            height: 1155px;
        }
        .style3
        {
            font-size: medium;
        }
        .style4
    {
        font-size: small;
    }
        .style5
        {
            text-decoration: underline;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p style="font-size: x-large; font-weight: bolder; ">
        <span class="style5">BMW - X6 </span> <span class="style2"><em>Maintenance</em></span><span 
            class="style5"> Discussion Forum</span>&nbsp;
       <a href  = "rssMaintenanceDiscussion.aspx">
        <asp:Image ID="Image2" runat="server" 
            ImageUrl="~/Pictures/feed-icon-28x28.png" BorderStyle="None" /></a>
    </p>
    <div class="discussionInformation">
        <span class="st">Welcome to the BMW - X6 Forums at www.bmw-x6.co.uk. Post all of 
            your BMW - X6 <strong><em>Maintenance</em></strong> related questions and receive answers from our users &amp; industry 
            experts.<br />
        <br />Thousands of our users login everyday to posts discussions and give answers too, 
            its free help and guidance only for you!!! 
            <br />
        <br /><strong><span class="style3"><em>To add a new discussion to this page, just enter the title of the discussion in the textbox below and 
                click &#39;Submit&#39;.
            
                </em></span></strong><br />
            <br />
        <strong><span class="style4">Useful Related Website: </span>
        <asp:TextBox ID="txtrelatedwebsite" runat="server" Font-Names="Calibri" 
            Width="279px">http://</asp:TextBox>
        </strong>
        </span>
        <br />
        <div class = "addMaintenanceDiscussion">
        
        <span class="st">
            
                <asp:TextBox ID="txtMaintenanceDescription" runat="server" BorderStyle="Solid" 
                    Height="94px" TextMode="MultiLine" Width="434px" BorderColor="Silver"></asp:TextBox>
&nbsp;
                <asp:Button ID="btnsubmit" runat="server" Height="31px" Text="Submit" 
                    Width="121px" BackColor="#99CCFF" />
            
            <br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtMaintenanceDescription" 
                ErrorMessage="You have not entered a comment, please check and try again." 
                Font-Bold="True" Font-Italic="True" ForeColor="Red"></asp:RequiredFieldValidator>
            
        </span>
        
        </div>
        <br />

        <div class = "objects">
    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" 
            style="font-size: small; font-family: Calibri">
            <AlternatingItemTemplate>
                </span style="background-color: #FFF8DC;">
                
                <strong>Title:</strong>
                 <a href="maintenancePostsAdd.aspx?id=<%# Eval("MaintenanceDisID") %>"><asp:Label ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' /> </a>
                <br />
                <strong>Date Created:</strong>
                <asp:Label ID="DateCreatedLabel" runat="server" 
                    Text='<%# Eval("DateCreated") %>' />
                <br />
                <strong>Related Website:</strong>
                <a href='<%# Eval("Website") %>'><asp:Label ID="WebsiteLabel" runat="server" Text='<%# Eval("Website") %>' /></a>
                
                <br />
                <strong>Created by:</strong>
                 <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>"><asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
                <br />
            </AlternatingItemTemplate>
            <EditItemTemplate>

                </span style="background-color: #008A8C;color: #FFFFFF;">
                
                Title:
                <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' />
                <br />
                DateCreated:
                <asp:TextBox ID="DateCreatedTextBox" runat="server" 
                    Text='<%# Bind("DateCreated") %>' />
                <br />
                Website:
                <asp:TextBox ID="WebsiteTextBox" runat="server" Text='<%# Bind("Website") %>' />
                <br />
                UserName:
                 <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>"><asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                    Text="Update" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Cancel" />
                <br />
                <br />
            </EditItemTemplate>
            <EmptyDataTemplate>
                <span>No data was returned.</span>
            </EmptyDataTemplate>
            <InsertItemTemplate>
                <span style="">Title:
                <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' />
                <br />DateCreated:
                <asp:TextBox ID="DateCreatedTextBox" runat="server" 
                    Text='<%# Bind("DateCreated") %>' />
                <br />Website:
                <asp:TextBox ID="WebsiteTextBox" runat="server" Text='<%# Bind("Website") %>' />
                <br />UserName:
                 <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>"><asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                    Text="Insert" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Clear" />
                <br /><br /></span>
            </InsertItemTemplate>
            <ItemTemplate>

                </span style="background-color: #DCDCDC;color: #000000;">
                
                <strong>Title:</strong>
                <a href="maintenancePostsAdd.aspx?id=<%# Eval("MaintenanceDisID") %>"><asp:Label ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' /> </a>
                <br />
                <strong>Date Created:</strong>
                <asp:Label ID="DateCreatedLabel" runat="server" 
                    Text='<%# Eval("DateCreated") %>' />
                <br />
                <strong>Related Website:</strong>
                <a href='<%# Eval("Website") %>'><asp:Label ID="WebsiteLabel" runat="server" Text='<%# Eval("Website") %>' /></a>
                <br />
                <strong>Created by:</strong>
                <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>"><asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
                <br />
            </ItemTemplate>
            <LayoutTemplate>
                <div ID="itemPlaceholderContainer" runat="server" 
                    style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                    <span runat="server" id="itemPlaceholder" />
                </div>
                <div style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                    <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="10">
                            
                                <Fields>
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                    <asp:NumericPagerField />
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                </Fields>
                            </asp:DataPager>
                </div>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <span style="background-color: #008A8C;font-weight: bold;color: #FFFFFF;">
                MaintenanceDisID:
                <asp:Label ID="MaintenanceDisIDLabel" runat="server" 
                    Text='<%# Eval("MaintenanceDisID") %>' />
                <br />
                Title:
                <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
                <br />
                DateCreated:
                <asp:Label ID="DateCreatedLabel" runat="server" 
                    Text='<%# Eval("DateCreated") %>' />
                <br />
                Website:
                <asp:Label ID="WebsiteLabel" runat="server" Text='<%# Eval("Website") %>' />
                <br />
                UserName:
                 <a href="UserProfileView.aspx?Username=<%# Eval("UserName") %>"><asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                <br />
<br /></span>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT Maintenance_Discussion.MaintenanceDisID, Maintenance_Discussion.Title, Maintenance_Discussion.DateCreated, Maintenance_Discussion.Website, aspnet_Users.UserName FROM (Maintenance_Discussion INNER JOIN aspnet_Users ON Maintenance_Discussion.UserIDFK = aspnet_Users.UserId) ORDER BY Maintenance_Discussion.MaintenanceDisID DESC">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT Maintenance_Discussion.MaintenanceDisID, Maintenance_Discussion.Title, Maintenance_Discussion.DateCreated, Maintenance_Discussion.Website, aspnet_Users.UserName FROM (Maintenance_Discussion INNER JOIN aspnet_Users ON Maintenance_Discussion.UserIDFK = aspnet_Users.UserId) ORDER BY Maintenance_Discussion.MaintenanceDisID DESC">
        </asp:SqlDataSource>
    
    </div>

    <br />

    <div class = "discussionForumMaintenance">
    
    </div>

    </div>
</asp:Content>
